﻿using System.Collections.Generic;

namespace DeepCompare
{
    /// <summary>
    ///     Statically object extensions of <see cref="System.Collections.Generic.IList{T}" />.
    /// </summary>
    public static class ListExtensions
    {
        /// <summary>
        ///     Removes the last item from the given list.
        /// </summary>
        /// <typeparam name="TObject">The type of the object.</typeparam>
        /// <param name="list">The list.</param>
        public static void RemoveLastItem<TObject>(this IList<TObject> list)
        {
            list.RemoveAt(list.Count - 1);
        }
    }
}